﻿Imports OMANE.Common.UI
Imports OMANE.Common.UI.Theme
Imports OMANE.Common.Model.Echeancier
Imports OMANE.Common.Model.Interfaces
Imports Microsoft.Practices.Prism.Commands

Namespace ViewModels

    ''' <summary>
    ''' Classe permettant de créer et de récupérer de manière statique les différents ViewModels du module taux garantis
    ''' </summary>
    ''' <remarks></remarks>
    Public Class Locator

        Public Sub New()

        End Sub

#Region "Modèle"
        Private Shared _model As ModelTauxGarantis
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Private ReadOnly Property Model() As ModelTauxGarantis
            Get
                Return ModelStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Friend Shared ReadOnly Property ModelStatic() As ModelTauxGarantis
            Get

                If _model Is Nothing Then
                    If Not ModuleTauxGaranti._app Is Nothing Then
                        Dim ModelOMANE As IModelOMANE = ModuleTauxGaranti._app.GetService(Of IModelOMANE)()
                        _model = New ModelTauxGarantis(ModelOMANE)
                    End If
                End If
                Return _model
            End Get
        End Property
#End Region

#Region "ViewModelCmdEncoursImport property"
        '' Private Shared _viewModelTraitementsViewerStatic As ViewModelTraitementsViewer
        ' ''' <summary>
        ' ''' View Model de l'écran de visualisation des traitements
        ' ''' </summary>
        ' ''' <remarks></remarks>
        ''Public Shared ReadOnly Property ViewModelTraitementsViewerStatic() As ViewModelTraitementsViewer
        ''    Get
        ''        If _viewModelTraitementsViewerStatic Is Nothing Then
        ''            Dim cmdNavigationOMANE As New DelegateCommand(AddressOf cmdNavigOMANE)
        ''            _viewModelTraitementsViewerStatic = New ViewModelTraitementsViewer(ModelStatic, "Traitements Viewer", cmdNavigationOMANE)
        ''        End If
        ''        Return _viewModelTraitementsViewerStatic
        ''    End Get
        ''End Property
        ' ''' <summary>
        ' ''' View Model de l'écran de visualisation des traitements
        ' ''' </summary>
        ' ''' <remarks></remarks>
        ''Public ReadOnly Property ViewModelTraitementsViewer() As ViewModelTraitementsViewer
        ''    Get
        ''        Return ViewModelTraitementsViewerStatic
        ''    End Get
        ''End Property
#End Region


#Region "ViewModelCmdEncoursImport property"
        Private Shared _viewModelCmdEncoursImportStatic As ViewModelCmdEncoursImport
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelCmdEncoursImportStatic() As ViewModelCmdEncoursImport
            Get
                If _viewModelCmdEncoursImportStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _viewModelCmdEncoursImportStatic = New ViewModelCmdEncoursImport(ModelStatic, "Fichier Encours", cmdNavigationOMANE)
                End If
                Return _viewModelCmdEncoursImportStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelCmdEncoursImport() As ViewModelCmdEncoursImport
            Get
                Return ViewModelCmdEncoursImportStatic
            End Get
        End Property
#End Region
#Region "ViewModelCmdEncoursCorresp property"
        Private Shared _viewModelCmdEncoursCorrespStatic As ViewModelCmdEncoursCorresp
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelCmdEncoursCorrespStatic() As ViewModelCmdEncoursCorresp
            Get
                If _viewModelCmdEncoursCorrespStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _viewModelCmdEncoursCorrespStatic = New ViewModelCmdEncoursCorresp(ModelStatic, "Correspondances", cmdNavigationOMANE)
                End If
                Return _viewModelCmdEncoursCorrespStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelCmdEncoursCorresp() As ViewModelCmdEncoursCorresp
            Get
                Return ViewModelCmdEncoursCorrespStatic
            End Get
        End Property
#End Region
#Region "ViewModelCmdEncoursRetrait property"
        Private Shared _viewModelCmdEncoursRetraitStatic As ViewModelCmdEncoursRetrait
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelCmdEncoursRetraitStatic() As ViewModelCmdEncoursRetrait
            Get
                If _viewModelCmdEncoursRetraitStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _viewModelCmdEncoursRetraitStatic = New ViewModelCmdEncoursRetrait(ModelStatic, "Retraitements", cmdNavigationOMANE)
                End If
                Return _viewModelCmdEncoursRetraitStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelCmdEncoursRetrait() As ViewModelCmdEncoursRetrait
            Get
                Return ViewModelCmdEncoursRetraitStatic
            End Get
        End Property
#End Region
#Region "ViewModelCmdEncoursStat property"
        Private Shared _viewModelCmdEncoursStatsStatic As ViewModelCmdEncoursStats
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelCmdEncoursStatsStatic() As ViewModelCmdEncoursStats
            Get
                If _viewModelCmdEncoursStatsStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _viewModelCmdEncoursStatsStatic = New ViewModelCmdEncoursStats(ModelStatic, "Statistiques", cmdNavigationOMANE)
                End If
                Return _viewModelCmdEncoursStatsStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelCmdEncoursStats() As ViewModelCmdEncoursStats
            Get
                Return ViewModelCmdEncoursStatsStatic
            End Get
        End Property
#End Region

#Region "ViewModelSegsSelection property"
        Private Shared _viewModelSegSelectionStatic As ViewModelSegSelection
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelSegSelectionStatic() As ViewModelSegSelection
            Get
                If _viewModelSegSelectionStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _viewModelSegSelectionStatic = New ViewModelSegSelection(ModelStatic, "Sélection", cmdNavigationOMANE)
                End If
                Return _viewModelSegSelectionStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelSegSelection() As ViewModelSegSelection
            Get
                Return ViewModelSegSelectionStatic
            End Get
        End Property
#End Region
#Region "ViewModelDonneesEconomiques property"
        Private Shared _ViewModelDonneesEconomiquesStatic As ViewModelDonneesEconomiques

        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelDonneesEconomiquesStatic() As ViewModelDonneesEconomiques
            Get
                If _ViewModelDonneesEconomiquesStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelDonneesEconomiquesStatic = New ViewModelDonneesEconomiques(ModelStatic, "Sélection", cmdNavigationOMANE)
                    _ViewModelDonneesEconomiquesStatic.Title = "DONNEES ECONOMIQUES"
                    _ViewModelDonneesEconomiquesStatic.Icone = StandardIcons.BLOG
                End If
                Return _ViewModelDonneesEconomiquesStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelDonneesEconomiques() As ViewModelDonneesEconomiques
            Get
                Return ViewModelDonneesEconomiquesStatic
            End Get
        End Property
#End Region
#Region "ViewModelEstimateurs property"
        Private Shared _ViewModelEstimateursStatic As ViewModelEstimateurs

        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelEstimateursStatic() As ViewModelEstimateurs
            Get
                If _ViewModelEstimateursStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelEstimateursStatic = New ViewModelEstimateurs(ModelStatic, "Sélection", cmdNavigationOMANE)
                    _ViewModelEstimateursStatic.Title = "ESTIMATEURS"
                    _ViewModelEstimateursStatic.Icone = StandardIcons.BRICKS
                End If
                Return _ViewModelEstimateursStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelEstimateurs() As ViewModelEstimateurs
            Get
                Return ViewModelEstimateursStatic
            End Get
        End Property
#End Region
#Region "ViewModelGarantiesDecesPtia property"
        Private Shared _ViewModelGarantiesDecesPtiaStatic As ViewModelGarantiesDecesPtia

        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelGarantiesDecesPtiaStatic() As ViewModelGarantiesDecesPtia
            Get
                If _ViewModelGarantiesDecesPtiaStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelGarantiesDecesPtiaStatic = New ViewModelGarantiesDecesPtia(ModelStatic, "Sélection", cmdNavigationOMANE)
                    _ViewModelGarantiesDecesPtiaStatic.Title = "GARANTIES DECES/PTIA"
                    _ViewModelGarantiesDecesPtiaStatic.Icone = StandardIcons.SCRIPT
                End If
                Return _ViewModelGarantiesDecesPtiaStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelGarantiesDecesPtia() As ViewModelGarantiesDecesPtia
            Get
                Return ViewModelGarantiesDecesPtiaStatic
            End Get
        End Property
#End Region
#Region "ViewModelGarantiesIncapInval property"
        Private Shared _ViewModelGarantiesIncapInvalStatic As ViewModelGarantiesIncapInval

        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelGarantiesIncapInvalStatic() As ViewModelGarantiesIncapInval
            Get
                If _ViewModelGarantiesIncapInvalStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelGarantiesIncapInvalStatic = New ViewModelGarantiesIncapInval(ModelStatic, "Sélection", cmdNavigationOMANE)
                    _ViewModelGarantiesIncapInvalStatic.Title = "GARANTIES INCAP/INVAL"
                    _ViewModelGarantiesIncapInvalStatic.Icone = StandardIcons.APPLICATION2
                End If
                Return _ViewModelGarantiesIncapInvalStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelGarantiesIncapInval() As ViewModelGarantiesIncapInval
            Get
                Return ViewModelGarantiesIncapInvalStatic
            End Get
        End Property
#End Region
#Region "ViewModelMethodeDeCalcul property"
        Private Shared _ViewModelMethodeDeCalculStatic As ViewModelMethodeDeCalcul
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelMethodeDeCalculStatic() As ViewModelMethodeDeCalcul
            Get
                If _ViewModelMethodeDeCalculStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelMethodeDeCalculStatic = New ViewModelMethodeDeCalcul(ModelStatic, "Sélection", cmdNavigationOMANE)
                    _ViewModelMethodeDeCalculStatic.Title = "METHODE DE CALCUL"
                    _ViewModelMethodeDeCalculStatic.Icone = StandardIcons.CALCULATOR
                End If
                Return _ViewModelMethodeDeCalculStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelMethodeDeCalcul() As ViewModelMethodeDeCalcul
            Get
                Return ViewModelMethodeDeCalculStatic
            End Get
        End Property
#End Region

#Region "ViewModelScenarioCentral property"
        Private Shared _ViewModelResScenCentralMeth1Static As ViewModelScenarioCentral
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelResScenCentralMeth1Static() As ViewModelScenarioCentral
            Get
                If _ViewModelResScenCentralMeth1Static Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelResScenCentralMeth1Static = New ViewModelScenarioCentral(ModelStatic, "Sélection", cmdNavigationOMANE)
                End If
                Return _ViewModelResScenCentralMeth1Static
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelResScenCentralMeth1() As ViewModelScenarioCentral
            Get
                Return ViewModelResScenCentralMeth1Static
            End Get
        End Property
#End Region
#Region "ViewModelResScenCentralMeth1CalculsDet property"
        Private Shared _ViewModelResScenCentralMeth1CalculsDetStatic As ViewModelCalculsDetailles
        ''' <summary>
        ''' View Model de l'écran des résultats détaillés du scénario central du modèle de calcul par équilibre tarifaire
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelResScenCentralMeth1CalculsDetStatic() As ViewModelCalculsDetailles
            Get
                If _ViewModelResScenCentralMeth1CalculsDetStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelResScenCentralMeth1CalculsDetStatic = New ViewModelCalculsDetailles(ModelStatic, "Sélection", cmdNavigationOMANE)
                End If
                Return _ViewModelResScenCentralMeth1CalculsDetStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelResScenCentralMeth1CalculsDet() As ViewModelCalculsDetailles
            Get
                Return ViewModelResScenCentralMeth1CalculsDetStatic
            End Get
        End Property
#End Region
#Region "ViewModelSensibilitesMeth1Det property"
        Private Shared _ViewModelSensibilitesMeth1Static As ViewModelSensibilites
        ''' <summary>
        ''' View Model de l'écran des résultats détaillés du scénario central du modèle de calcul par équilibre tarifaire
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelSensibilitesMeth1Static() As ViewModelSensibilites
            Get
                If _ViewModelSensibilitesMeth1Static Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelSensibilitesMeth1Static = New ViewModelSensibilites(ModelStatic, "Sélection", cmdNavigationOMANE)
                End If
                Return _ViewModelSensibilitesMeth1Static
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelSensibilitesMeth1() As ViewModelSensibilites
            Get
                Return ViewModelSensibilitesMeth1Static
            End Get
        End Property
#End Region
#Region "ViewModelStressTestMeth1Det property"
        Private Shared _ViewModelStressTestMeth1Static As ViewModelStressTests
        ''' <summary>
        ''' View Model de l'écran des résultats détaillés du scénario central du modèle de calcul par équilibre tarifaire
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelStressTestMeth1Static() As ViewModelStressTests
            Get
                If _ViewModelStressTestMeth1Static Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelStressTestMeth1Static = New ViewModelStressTests(ModelStatic, "Sélection", cmdNavigationOMANE)
                End If
                Return _ViewModelStressTestMeth1Static
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelStressTestMeth1() As ViewModelStressTests
            Get
                Return ViewModelStressTestMeth1Static
            End Get
        End Property
#End Region
#Region "ViewModelSynthese property"
        Private Shared _ViewModelSyntheseMeth1Static As ViewModelSynthese
        ''' <summary>
        ''' View Model de l'écran des résultats détaillés du scénario central du modèle de calcul par équilibre tarifaire
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelSyntheseMeth1Static() As ViewModelSynthese
            Get
                If _ViewModelSyntheseMeth1Static Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelSyntheseMeth1Static = New ViewModelSynthese(ModelStatic, "Sélection", cmdNavigationOMANE)
                End If
                Return _ViewModelSyntheseMeth1Static
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelSyntheseMeth1() As ViewModelSynthese
            Get
                Return ViewModelSyntheseMeth1Static
            End Get
        End Property
#End Region

#Region "ViewModelResCRT property"
        Private Shared _ViewModelResCRTStatic As ViewModelResCRT
        ''' <summary>
        ''' View Model de l'écran de calcul de l'échéancier
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelResCRTStatic() As ViewModelResCRT
            Get
                If _ViewModelResCRTStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelResCRTStatic = New ViewModelResCRT(ModelStatic, "Compte de résultat", cmdNavigationOMANE)
                End If
                Return _ViewModelResCRTStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelResCRT() As ViewModelResCRT
            Get
                Return ViewModelResCRTStatic
            End Get
        End Property
#End Region

#Region "ViewModelSimulation property"
        Private Shared _ViewModelSimulationStatic As ViewModelSimulation
        ''' <summary>
        ''' View Model de l'écran de calcul de l'échéancier
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelSimulationStatic() As ViewModelSimulation
            Get
                If _ViewModelSimulationStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelSimulationStatic = New ViewModelSimulation()
                End If
                Return _ViewModelSimulationStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelSimulation() As ViewModelSimulation
            Get
                Return ViewModelSimulationStatic
            End Get
        End Property
#End Region

#Region "ViewModelTarif property"
        Private Shared _ViewModelTarifStatic As ViewModelTarif
        ''' <summary>
        ''' View Model de l'écran de calcul de l'échéancier
        ''' </summary>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property ViewModelTarifStatic() As ViewModelTarif
            Get
                If _ViewModelTarifStatic Is Nothing Then
                    Dim cmdNavigationOMANE As New DelegateCommand(Of String)(AddressOf cmdNavigOMANE)
                    _ViewModelTarifStatic = _
                        New ViewModelTarif(New AdapteMoteurEcheancier("Echéancier", Nothing),
                                           New Actuariat.TablesMortaliteIntegreesFactory,
                                           New Actuariat.TablesMaintienINCINVIntegreesFactory,
                                           "Tarification",
                                           cmdNavigationOMANE)
                End If
                Return _ViewModelTarifStatic
            End Get
        End Property
        ''' <summary>
        ''' 
        ''' </summary>
        ''' <remarks></remarks>
        Public ReadOnly Property ViewModelTarif() As ViewModelTarif
            Get
                Return ViewModelTarifStatic
            End Get
        End Property
#End Region



#Region "Commandes"
        Private Shared Sub cmdNavigOMANE(ByVal Lien As String)
            'Ajouter un paramètre permettant de connaitre la vue demandée
        End Sub
#End Region

    End Class

End Namespace